# 获取合同文件
from db_client import *
from flask import request
import json
import sys
sys.path.append("..")


def get_contract_file():
    t = {}
    id = request.args.get('id')
    result = mysql_client.get_contract_file(id)
    for re in result:
        t = {
            "id": re[0],
            "order_id": re[1],
            "date": re[2]
        }
    data = {
        "contract_file": t
    }
    return json.dumps(data, ensure_ascii=False)
